'''
'''

from PyQt4.QtCore import pyqtSignature
from PyQt4.QtGui import QDialog
from SimpleCells.Components.List.SCArrayView import SCArrayModel
from SimpleCells.Gui.Ui_SCArrayDialog import Ui_SCArrayDialog

class SCArrayDialog(QDialog,Ui_SCArrayDialog):
    ''''''

    def __init__(self,data,parent=None):
        QDialog.__init__(self,parent)
        self.setupUi(self)
        self.__data = data
        self.__model = SCArrayModel(data.copy())
        self.arrayView.setModel(self.__model)
    
    def getData(self):
        return self.__data

    def accept(self):
        self.__data = self.__model.getData()
        QDialog.accept(self)
